package com.example.aics.assistant;

import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;


/** 小智医疗助手 */
@AiService(wiringMode = EXPLICIT 
        // chatModel = "qwenChatModel" // 注入非流式chatModel
        , streamingChatModel = "qwenStreamingChatModel" // 注入流式chatModel
        , chatMemoryProvider = "xiaozhiChatMemoryProvider"  // 注入聊天记忆的保存工具
        , tools = "appointmentTools"  // 注入大模型执行function call back 的工具
        , contentRetriever = "xiaoZhiContentRetriever"  // 注入内容检索工具
        )
public interface XiaoZhiChatAssistant {

    @SystemMessage(fromResource = "xiaozhi-promt-template.txt")
    Flux<String> chat(@MemoryId String memoryId,@UserMessage String message);

}
